<login>
    <input id="username" name="username" type="text"/>
    <input id="password" name="password" type="password"/>
<br/>
    <button id="submit" name="submit" onclick="{submit}" type="button">submit</button>

    <script>
        var username = this.username.value,
            password = this.password.value;
        var self = this;
        login = '';

        submit() {
            login.login({name:this.username.value,password:this.password.value});
        }

        this.on('update', function () {
            username = this.username.value;
            password = this.password.value;
            console.log('hello submit', username, password);
        });

        require(['login'],function(l){
            console.log(login);
            login = l;
        })
    </script>

</login>
